-
Notifications
You must be signed in to change notification settings - Fork 322
Support include query parameter for list roles #1228
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
|
Hey @Fabian-K , thanks for your contribution! Could you please:
|
39c1ca6
to
49427f3
Compare
@Kehrlann Thanks for picking this up! I´ve rebased and added an integration test. I did however not run the integration test because I don´t have a cf landscape available with admin permissions. I only used a local build of the client and was able to do some testing there. |
@Fabian-K Thanks! Will run the integration tests and let you know. Please apply the formatting rules on the integration test project as well:
|
49427f3
to
eecd9d2
Compare
Done, thank you! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One issue. Will run integration tests once I have an env provisioned.
cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/users/User.java
Show resolved
Hide resolved
eecd9d2
to
dba4242
Compare
@Fabian-K this is in backlog, but we're in the middle of infrastructure migration, so I don't have an env at the moment. I'll merge this when I can test it. |
@Fabian-K I finally got a chance to run the integration test. Unfortunately, it does not work, and fails with:
That's because the response to the roles request looks like this: {
"pagination": {
"total_results": 1,
"total_pages": 1,
"first": {
"href": "https://api.sys.tas.7f364f3c.shepherd.tanzu.broadcom.net/v3/roles?guids=d5cae192-3d32-4be2-b786-4bf07600d06b&include=user&order_by=%2Bcreated_at&page=1&per_page=50"
},
"last": {
"href": "https://api.sys.tas.7f364f3c.shepherd.tanzu.broadcom.net/v3/roles?guids=d5cae192-3d32-4be2-b786-4bf07600d06b&include=user&order_by=%2Bcreated_at&page=1&per_page=50"
},
"next": null,
"previous": null
},
"resources": [
{
"guid": "d5cae192-3d32-4be2-b786-4bf07600d06b",
"created_at": "2025-07-10T08:41:01Z",
"updated_at": "2025-07-10T08:41:01Z",
"type": "organization_user",
"relationships": {
"user": {
"data": {
"guid": "test-user-id-b99k7"
}
},
"organization": {
"data": {
"guid": "56e6381d-7219-451d-ab4b-10576d49a0ac"
}
},
"space": {
"data": null
}
},
"links": {
"self": {
"href": "https://api.sys.tas.7f364f3c.shepherd.tanzu.broadcom.net/v3/roles/d5cae192-3d32-4be2-b786-4bf07600d06b"
},
"user": {
"href": "https://api.sys.tas.7f364f3c.shepherd.tanzu.broadcom.net/v3/users/test-user-id-b99k7"
},
"organization": {
"href": "https://api.sys.tas.7f364f3c.shepherd.tanzu.broadcom.net/v3/organizations/56e6381d-7219-451d-ab4b-10576d49a0ac"
}
}
}
],
"included": {
"users": [
{
"guid": "test-user-id-b99k7",
"created_at": "2025-07-10T08:41:01Z",
"updated_at": "2025-07-10T08:41:01Z",
"username": null,
"presentation_name": "test-user-id-b99k7",
"origin": null,
"metadata": {
"labels": {},
"annotations": {}
},
"links": {
"self": {
"href": "https://api.sys.tas.7f364f3c.shepherd.tanzu.broadcom.net/v3/users/test-user-id-b99k7"
}
}
}
]
}
} And, AFAICT, this is not a valid |
Hi,
this PR adds support for the "include" query parameter to the list roles request API v3. This is my first contribution to this repository. Please let me know in case I missed something :)
Thanks,
Fabian
fixes #1204